package com.pi2e.view.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import butterknife.Bind;
import butterknife.ButterKnife;

import com.pi2e.R;
import com.pi2e.constant.TextConstant;
import com.pi2e.view.base.BaseActivity;
import com.pi2e.view.common.FootView;
import com.pi2e.view.common.HeaderView;

public class SettingActivity extends BaseActivity implements OnClickListener {
	
	@Bind(R.id.img_netcon)
	ImageView img_netconn ;	
	@Bind(R.id.img_welcome)
	ImageView img_welcome ;	
	@Bind(R.id.img_reply)
	ImageView img_reply ;	
	@Bind(R.id.img_display)
	ImageView img_display ;	
	@Bind(R.id.img_map)
	ImageView img_map ;	
	@Bind(R.id.img_product)
	ImageView img_product ;	
	@Bind(R.id.footId)
	View mfootView ;
		
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
	}

	@Override
	public HeaderView initHeaderView() {
		HeaderView hv = new HeaderView(findViewById(R.id.headId),this) ;
		hv.getTitle_Tv().setText(TextConstant.ROBOT_WELCOME_CONTENT);
		return hv;
	}

	@Override
	public void setContentView() {
		
		setContentView(R.layout.activity_setting);
		ButterKnife.bind(this);
	}

	@Override
	public void initView() {
		// TODO Auto-generated method stub
		img_display.setOnClickListener(this);
		img_map.setOnClickListener(this);
		img_netconn.setOnClickListener(this);
		img_product.setOnClickListener(this);
		img_reply.setOnClickListener(this);
		img_welcome.setOnClickListener(this);
		
	}

	@Override
	public void onClick(View v) {
		int vid = v.getId() ;
		Intent it = null ;
		switch(vid){
		case R.id.img_display:
			break ;
		case R.id.img_welcome:
			break ;
		case R.id.img_reply:
			 it = new Intent(SettingActivity.this,ReplySetActivity.class) ;
			
			break ;
		case R.id.img_netcon:
			 it = new Intent(SettingActivity.this,NetSetActivity.class) ;
			break ;
		case R.id.img_product:
			break ;
		case R.id.img_map:
			break ;
		
		}
		if (null != it) {
			startActivity(it) ;
		}
		
	}

	@Override
	public void initFootView() {
		// TODO Auto-generated method stub
		FootView footView = new FootView(SettingActivity.this, mfootView) ;
		footView.getBtn_ok().setText("退 出");
		footView.getBtn_ok().setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				finish();			
			}
		});
	}

}
